<template>
  <div class="footer">
    <div class="remainder">{{ $store.getters.unDoneLeng }}条剩余</div>
    <div class="auto">
      <div class="all" @click="$store.commit('changeViewKey', 'all')">全部</div>
      <div class="unfinished" @click="$store.commit('changeViewKey', 'undone')">
        未完成
      </div>
      <div class="finished" @click="$store.commit('changeViewKey', 'done')">
        已完成
      </div>
    </div>
    <div class="clear" @click="$store.commit('clearBoth')">清除</div>
  </div>
</template>

<style scoped>
.footer {
  display: flex;
  justify-content: space-between;
}
div {
  text-align: center;
  line-height: 50px;
  cursor: pointer;
}
.current {
  background-color: blue;
  color: #fff;
  font-weight: 400;
}
.remainder,
.clear {
  width: 100px;
  border-radius: 5px;
}
.remainder {
  background-color: skyblue;
}
.clear {
  color: skyblue;
}
.clear:hover {
  color: #fff;
  background-color: skyblue;
}
.auto {
  display: flex;
  width: 300px;
  border-radius: 20px;
  overflow: hidden;
}
.auto > div {
  flex: 1;
}
.auto > div:hover {
  background-color: green;
  color: #fff;
}
</style>
